function [k, k_track_cart] = determine_intercept_iteration(pos_az, pos_upd, radar_bw, A, x, radar_pos)

k = 0;

while 1
  k_pos_az = pos_az + k * pos_upd;
  k_start_az = k_pos_az - radar_bw/2;
  k_stop_az = k_pos_az + radar_bw/2;
  
  kp1_pos_az = k_pos_az + pos_upd;
  kp1_start_az = kp1_pos_az - radar_bw/2;
  kp1_stop_az = kp1_pos_az + radar_bw/2;
  
  k_track_cart = A^k * x;
  k_track_pol = cart2pol(k_track_cart(1:2)', radar_pos');
  k_track_az = rad2deg(k_track_pol(2));
  
  mod_track_az = mod(k_track_az, 360);
  
  mod_start_az = mod(k_start_az, 360);
  mod_stop_az = mod(k_stop_az, 360);
  
  if abs(mod_stop_az - mod_start_az) > radar_bw
    if ((mod_start_az-360) <= mod_track_az) && (mod_track_az <= mod_stop_az)
      break;
    end
  else
    if (mod_start_az <= mod_track_az) && (mod_track_az <= mod_stop_az)
      break;
    end
  end
  
  k = k + 1;
  
  mod_start_az = mod(kp1_start_az, 360);
  mod_stop_az = mod(kp1_stop_az, 360);
  
  if abs(mod_stop_az - mod_start_az) > radar_bw
    if ((mod_start_az-360) <= mod_track_az) && (mod_track_az <= mod_stop_az)
      break;
    end
  else
    if (mod_start_az <= mod_track_az) && (mod_track_az <= mod_stop_az)
      break;
    end
  end
end

end